#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <stdlib.h>

void swap(char* S, int i, int j)
{
	char temp = S[i];
	S[i] = S[j];
	S[j] = temp;
}

char* reverseOnlyLetters(char* S) {
	int lengh = 0;
	char arrTemp[100] = { 0 };
	int j = 0;
	int i = 0;
	while (S[i++] != '\0')
	{
		lengh++;
	}
	for (int b = 0; b < lengh; b++)
	{
		if ((S[b] >= 97 && S[b] <= 122) || (S[b] >= 65 && S[b] <= 90))
		{
			arrTemp[j++] = b;
		}
	}
	for (int a = 0; a < j / 2; a++)
	{
		swap(S, arrTemp[a], arrTemp[j - 1 - a]);
	}
	return S;
}



int main()
{
	
	return 0;
}




	
